package cn.com.doone.common.uc.domain.rs;

import java.util.List;
import java.util.Map;

import cn.com.doone.common.uc.domain.oauth.AccessToken;
import cn.com.doone.common.uc.domain.oauth.ClientDetails;
import cn.com.doone.common.uc.domain.shared.Repository;

/**
 * 2015/10/7
 *
 * @author Shengzhao Li
 */

public interface OAuthRSRepository extends Repository {

    AccessToken findAccessTokenByTokenId(String tokenId);

    ClientDetails findClientDetailsByClientIdAndResourceIds(String clientId, String resourceIds);
    
    public List<Map<String, Object>> getTenantInfo(String username);
    
    /**
     * 根据userInfoId查询岗位和组
     * @param paramsMap
     * @return
     */
    public List<Map<String,Object>> getGroupPostTypeListByUserInfoId(String userInfoId);
    
    public Map<String, Object> getUserInfo(String username);
    
    public int updateUserInfo(Map map);
    
    public Map<String, Object> getTenantCode(String groupCode);
    
    public Map<String, Object> getUserInfoExtend(int userInfoId);
    
    public int saveUserInfoExtend(Map map);
    
    public int updateUserInfoExtend(Map map);
    
    /**
     * 根据token获取信息
     * @author cjf
     * @param paramsMap
     * @return
     */
    public Map<String,Object> queryInfoByToken(Map<String,Object> paramsMap);
    
    /**
     * 根据clientId查询应用信息
     * @param clientId
     * @return
     */
    public Map<String,Object> queryAppInfoByClientId(String clientId);
    
	/**
	 * 根据手机号码查询用户信息
	 * @param mobilePhone
	 * @return
	 */
	public Map<String,Object> queryUserInfoByPhone(String mobilePhone);
}